{% extends "index.html" %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的网库-用户注册</title>
</head>
<body>

{% block div_body %}
<div class="div_body">
    <h2>用户登录</h2>
    <form action="/register/" method="post">
        账号：
        <input type="text" name="username" id="username"/>
        密码：
        <input type="password" name="password" id="password"/>
        再次确认密码：
        <input type="password" name="password2" id="password2"/>
        <button type="submit">注册</button>
        <button type="reset">重置</button>
        <button type="button" onclick=""><a href="{{ url }}/index">已有账号</a></button>
    </form>
</div>
{% endblock %}

<script>

    function register_button() {
         username = document.getElementById("username")
         password = document.getElementById("password")
         password2 = document.getElementById("password2")
         if(password === password2){
            alert("恭喜你注册成功，你的账号是"+username+"你的密码是："+password)
         }else {
            alert("两次密码不一致，请重新输入密码")
         }
}




</script>



</body>
</html>